import { createWebHistory, createRouter } from 'vue-router'

import Home from '../views/Home.vue'
import Login from '../views/Login.vue'
import Register from '../views/Register.vue'
import CourseList from '../views/CourseList.vue'
import CourseDetail from '../views/CourseDetail.vue'
import Cart from '../views/Cart.vue'
import Checkout from '../views/Checkout.vue'
import PaySuccess from '../views/PaySuccess.vue'
import CourseStudy from '../views/CourseStudy.vue'


const routes = [
    { path: '/', component: Home},
    { path: '/login', component: Login},
    { path: '/register', component: Register},
    { path: '/courses', component: CourseList},
    { path: '/course/:id', component: CourseDetail},
    { path: '/cart', component: Cart},
    { path: '/checkout', component: Checkout},
    { path: '/pay-success', component: PaySuccess},
    { path: '/course-study', name: 'CourseStudy', component: CourseStudy },

]

const router = createRouter({
    history: createWebHistory(),
    routes,
})


export default router